#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""business URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from business import views


urlpatterns = [
    # 默认显示客户信息
    url(r'^$', views.list_customer, name='list_customer'),
    url(r'^(\d+)$', views.list_customer, name='list_page_customer'),
    url(r'^add_customer$', views.add_customer, name='add_customer'),
    url(r'^show_customer/(.*)$', views.show_customer, name='show_customer'),
    url(r'^search_customer$', views.search_customer, name='search_customer'),
    url(r'^mod_customer/(.*)$', views.mod_customer, name='mod_customer'),
    url(r'^del_customer$', views.del_customer, name='del_customer'),

    # 线路业务订单
    url(r'^circuit_order$', views.list_circuit_order,
        name='list_circuit_order'),
    url(r'^circuit_order/(\d+)$', views.list_circuit_order,
        name='list_page_circuit_order'),
    url(r'^add_circuit_order/(\d+)$', views.add_circuit_order,
        name='add_circuit_order'),
    url(r'^show_circuit_order/(.*)$', views.show_circuit_order,
        name='show_circuit_order'),
    url(r'^search_circuit_order$', views.search_circuit_order,
        name='search_circuit_order'),
    url(r'^mod_circuit_order/(.*)$', views.mod_circuit_order,
        name='mod_circuit_order'),
    url(r'^del_circuit_order$', views.del_circuit_order,
        name='del_circuit_order'),

    # ticket系统
    url(r'^ticket$', views.list_ticket, name='list_ticket'),
    url(r'^ticket/(\d+)$', views.list_ticket, name='list_page_ticket'),
    url(r'^add_ticket/(\d+)$', views.add_ticket, name='add_ticket'),
    url(r'^show_ticket/(.*)$', views.show_ticket, name='show_ticket'),
    url(r'^mod_ticket/(.*)$', views.mod_ticket, name='mod_ticket'),
    url(r'^del_ticket$', views.del_ticket, name='del_ticket'),

    # ticket——message系统
    url(r'^add_ticket_message/(\d+)$', views.add_ticket_message,
        name='add_ticket_message'),
    url(r'^mod_ticket_message/(.*)$', views.mod_ticket_message,
        name='mod_ticket_message'),
    url(r'^del_ticket_message$', views.del_ticket_message,
        name='del_ticket_message'),
]
